﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Gizmox.WebGUI.Forms;
using GuiLabs.Undo;
using System.Drawing;
using Bronze.ReportBuilder.Actions;

namespace Bronze.ReportBuilder
{
    public static class DoAction
    {
        public static void SetSize(ActionManager actMgr, Control control, Size size)
        {
            SetSize(actMgr,control, size, true);
        }

        public static void SetSize(ActionManager actMgr, Control control, Size size, bool needSetValue)
        {
            var action = new ResizeAction(control, size);
            actMgr.RecordAction(action);
        }

        public static void SetLocation(ActionManager actMgr, Control control, Point loc, bool needSetValue = true)
        {
            var action = new LocationAction(control, loc);
            actMgr.RecordAction(action);
        }
    }
}